package com.share.common.rabbit.MqConstant;

import org.springframework.stereotype.Component;

public class MqConst {
    /**
     * 最大重试次数
     */
    public static final int MAX_RETRY_COUNT = 50;

    /**
     * 消息头：重试次数
     */
    public static final String RETRY_COUNT_HEADER = "x-retry-count";

    /**
     * 交换机名称定义
     */
    public static final String EXCHANGE_TOPIC_ORDER = "exchange.topic.order";

    public static final String EXCHANGE_REDIS_SYNC = "exchange.redis-sync";

    public static final String DEAD_LETTER_EXCHANGE = "exchange.dead_letter_exchange";

    /**
     * 路由定义
     */
    public static final String ROUTING_ORDER_CANCEL = "order.cancel";

    public static final String ROUTING_REDIS_SYNC = "canal-mq-share-device";

    public static final String ROUTING_DEAD_LETTER = "dead-letter";

    /**
     * 队列定义
     */
    public static final String QUEUE_ORDER_CANCEL = "queue.order.cancel";

    public static final String QUEUE_REDIS_SYNC = "canal-mq-share-device";

    public static final String QUEUE_DEAD_LETTER = "dead-letter";


    /**
     * 订单
     */
    public static final String EXCHANGE_ORDER = "share.order";

    public static final String ROUTING_SUBMIT_ORDER = "share.submit.order";
    public static final String ROUTING_END_ORDER = "share.end.order";

    //队列
    public static final String QUEUE_SUBMIT_ORDER = "share.submit.order";
    public static final String QUEUE_END_ORDER = "share.end.order";

    /**
     * 支付
     */
    public static final String EXCHANGE_PAYMENT_PAY = "share.payment";
    public static final String ROUTING_PAYMENT_PAY = "share.payment.pay";
    public static final String QUEUE_PAYMENT_PAY = "share.payment.pay";


    /**
     * 解锁卡槽延迟消息
     */
    public static final String EXCHANGE_DEVICE = "share.device";
    public static final String ROUTING_UNLOCK_SLOT = "share.unlock.slot";
    public static final String QUEUE_UNLOCK_SLOT = "share.unlock.slot";
    public static final Integer CANCEL_UNLOCK_SLOT_DELAY_TIME = 1 * 5;

}
